TARGET=td50
CC=gcc
CXX=g++
CXXFLAGS =-std=c++0x -g
OBJ=main.o wav.o
SRC=main.cpp wav.cpp

SYSTEM:=$(shell uname -o)

ifeq ($(SYSTEM), Msys2)
	HEADER_PATH = -IC:/msys64/mingw64/include/
	LIB_PATH = -LC:/msys64/mingw64/lib
else
	HEADER_PATH = -I/usr/local/include/opencv4
	LIB_PATH = -L/usr/local/lib
endif

LIBS =

$(TARGET):$(OBJ)
	$(CXX) -o $(TARGET) $(OBJ) $(LIB_PATH) $(LIBS)

$(OBJ):$(SRC)
	$(CXX) -c $(SRC) $(HEADER_PATH) $(CXXFLAGS)

clean:
	rm $(OBJ) $(TARGET)
